﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Web.SystemLogin.ServiceContract;
using Web.SystemLogin.Business;
using System.ServiceModel;
using Web.SystemLogin.Models;

namespace Web.SystemLogin.ServiceImplement
{
    public class SystemLoginService : ISystemLoginService
    {
        //[Dependency]
        //public BUSSystemLogin BusinessComponent
        //{ get; set; }


        BUSSystemLogin BusinessComponent;
        public SystemLoginService()
        {
            BusinessComponent = new BUSSystemLogin();
        }

        #region ISystemLoginService 成员

        //[OperationBehavior(TransactionScopeRequired = true)]
        public User GetCurrentUser(string userID)
        {
           return this.BusinessComponent.GetCurrentUser(userID);
        }

        public string CheckLoginNameAvailable(string loginName)
        {
            return BusinessComponent.CheckLoginNameAvailable(loginName);
        }

        public bool CheckUserPassword(string userID, string passwd)
        {
            return BusinessComponent.CheckUserPassword(userID, passwd);
        }

        public void UpdateUserLoginInfo(string userID)
        {
             BusinessComponent.UpdateUserLoginInfo(userID);
        }
        #endregion
    }
}
